3.267 \(\int \cot ^2(c+d x) (a+b \sec (c+d x)) \, dx\)

Optimal. Leaf size=26 \[ -\frac {\cot (c+d x) (a+b \sec (c+d x))}{d}-a x \]

[Out]

-a*x-cot(d*x+c)*(a+b*sec(d*x+c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3882, 8} \[ -\frac {\cot (c+d x) (a+b \sec (c+d x))}{d}-a x \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^2*(a + b*Sec[c + d*x]),x]

[Out]

-(a*x) - (Cot[c + d*x]*(a + b*Sec[c + d*x]))/d

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3882

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> -Simp[((e*Cot[c
+ d*x])^(m + 1)*(a + b*Csc[c + d*x]))/(d*e*(m + 1)), x] - Dist[1/(e^2*(m + 1)), Int[(e*Cot[c + d*x])^(m + 2)*(
a*(m + 1) + b*(m + 2)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && LtQ[m, -1]

Rubi steps

\begin {align*} \int \cot ^2(c+d x) (a+b \sec (c+d x)) \, dx &=-\frac {\cot (c+d x) (a+b \sec (c+d x))}{d}-\int a \, dx\\ &=-a x-\frac {\cot (c+d x) (a+b \sec (c+d x))}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.02, size = 43, normalized size = 1.65 \[ -\frac {a \cot (c+d x) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};-\tan ^2(c+d x)\right )}{d}-\frac {b \csc (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^2*(a + b*Sec[c + d*x]),x]

[Out]

-((b*Csc[c + d*x])/d) - (a*Cot[c + d*x]*Hypergeometric2F1[-1/2, 1, 1/2, -Tan[c + d*x]^2])/d

________________________________________________________________________________________

fricas [A]  time = 0.64, size = 33, normalized size = 1.27 \[ -\frac {a d x \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) + b}{d \sin \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2*(a+b*sec(d*x+c)),x, algorithm="fricas")

[Out]

-(a*d*x*sin(d*x + c) + a*cos(d*x + c) + b)/(d*sin(d*x + c))

________________________________________________________________________________________

giac [A]  time = 0.21, size = 52, normalized size = 2.00 \[ -\frac {2 \, {\left (d x + c\right )} a - a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {a + b}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2*(a+b*sec(d*x+c)),x, algorithm="giac")

[Out]

-1/2*(2*(d*x + c)*a - a*tan(1/2*d*x + 1/2*c) + b*tan(1/2*d*x + 1/2*c) + (a + b)/tan(1/2*d*x + 1/2*c))/d

________________________________________________________________________________________

maple [A]  time = 0.45, size = 35, normalized size = 1.35 \[ \frac {a \left (-\cot \left (d x +c \right )-d x -c \right )-\frac {b}{\sin \left (d x +c \right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^2*(a+b*sec(d*x+c)),x)

[Out]

1/d*(a*(-cot(d*x+c)-d*x-c)-b/sin(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.54, size = 31, normalized size = 1.19 \[ -\frac {{\left (d x + c + \frac {1}{\tan \left (d x + c\right )}\right )} a + \frac {b}{\sin \left (d x + c\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2*(a+b*sec(d*x+c)),x, algorithm="maxima")

[Out]

-((d*x + c + 1/tan(d*x + c))*a + b/sin(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 1.30, size = 48, normalized size = 1.85 \[ \frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {a}{2}-\frac {b}{2}\right )}{d}-\frac {\frac {a}{2}+\frac {b}{2}}{d\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}-a\,x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)^2*(a + b/cos(c + d*x)),x)

[Out]

(tan(c/2 + (d*x)/2)*(a/2 - b/2))/d - (a/2 + b/2)/(d*tan(c/2 + (d*x)/2)) - a*x

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right ) \cot ^{2}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**2*(a+b*sec(d*x+c)),x)

[Out]

Integral((a + b*sec(c + d*x))*cot(c + d*x)**2, x)

________________________________________________________________________________________